package com.soilflow.common.domain.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.soilflow.common.mybatisplus.BaseEntity;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/** 
@author dhp 
@date 2023/4/21 - 14:17
*/

/**
    * 菜品分类
    */
@Data
public class LandClassifyVo  {
    /**
     * 主键
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 分类名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 分类id
     */
    @TableField(value = "parent_id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long parentId;

    /**
     * 祖级列表
     */
    @TableField(value = "ancestors")
    private String ancestors;

    private static final long serialVersionUID = 1L;
    /** 父分类名称 */
    private String parentName;
    /** 子分类 */
    private List<LandClassifyVo> children = new ArrayList<LandClassifyVo>();
}